//
//  LXTreeCell.m
//  SourceCodeRead
//
//  Created by Kael on 2018/5/27.
//  Copyright © 2018年 Kael. All rights reserved.
//

#import "LXTreeCell.h"
#import "LXTreeView.h"
@interface LXTreeCell()

//@property (nonatomic, strong) UITableView *tableView;


@end

@implementation LXTreeCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initBaseData];
        [self initBaseView];
    }
    return self;
}

#pragma mark - **************** 初始化操作
- (void)initBaseData {
    
}

- (void)initBaseView {
    
}
-(void)loadLXTreeView{
    if (!_lxtreeView) {
        _lxtreeView = [[LXTreeView alloc]init];
        _lxtreeView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
        _lxtreeView.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:_lxtreeView];
    }
}

-(void)loadData:(NSDictionary *)dic{
    _modelDic = dic;
    
    [self loadLXTreeView];
    _lxtreeView.dataSource = [dic objectForKey:@"childs"];
    [_lxtreeView.tableView reloadData];
}

-(CGFloat)cellHeight{
    
    return 144;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
